#include "CGEEvent.h"

CGEEvent::CGEEvent(void)
{
}

CGEEvent::~CGEEvent(void)
{
}

bool CGEEvent::PollEvent()
{
	return SDL_PollEvent( &m_Event );
}

CGEEventType CGEEvent::GetEventType()
{
	//not very beautiful,but very effective
	return (CGEEventType)m_Event.type;
}

CGEKey	CGEEvent::GetKey()
{
	return (CGEKey)m_Event.key.keysym.sym;
}

CGEMouseButton CGEEvent::GetMouseButton()
{
	return (CGEMouseButton)m_Event.button.button;
}

void CGEEvent::GetMousePos(int *x, int *y)
{
	*x=m_Event.motion.x; *y=m_Event.motion.y;
}

unsigned char* CGEEvent::GetKeyState()
{
	return SDL_GetKeyState(NULL);
}